package cn.lds.health.mapper;

import cn.lds.health.dto.AppointMentRecordCondition;
import cn.lds.health.dto.Pager;
import cn.lds.health.entity.AppointmentRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName AppointmentRecordMapper
 * @Description TODO
 * @Author Christopher
 * @Date 2023/8/9 08:52
 * @Version 1.0
 **/

public interface AppointmentRecordMapper {
	
	/**
	 * 根据条件查询预约记录
	 * @param condition
	 * @return
	 */
	List<AppointmentRecord> selectAppointMentRecordByCondition(@Param("condition") AppointMentRecordCondition condition, @Param("pager")Pager pager);
	
	/**
	 * 添加新预约
	 * @param record
	 * @return
	 */
	int addAppointment(AppointmentRecord record);
	
	/**
	 * 确认预约
	 * @param id
	 * @return
	 */
	int confirmAppoint(Integer id);
	
	/**
	 * 取消预约
	 * @param id
	 * @return
	 */
	int cancelAppoint(Integer id);
	
	int selectAppointCount(AppointMentRecordCondition condition);
}